package com.czy.controller;

import javax.jms.JMSException;
import javax.jms.TextMessage;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

@Component
public class TopicConsumer {
	
	@JmsListener(destination="${mytopic}")
	public void receive(TextMessage textMessage) throws JMSException {
		System.out.println("消费者接受消息：" + textMessage.getText());
	}

}
